package com.my.ddd_sample_collections.aggregate_change_tracking.dao;

import com.my.ddd_sample_collections.aggregate_change_tracking.dao.po.MyAggregatePO;
import com.my.ddd_sample_collections.aggregate_change_tracking.domain.MyAggregateDO;
import org.springframework.stereotype.Component;

@Component
public class MyAggregateDAO {
    public MyAggregatePO findById(String id) {
        //FIXME 这里只是模拟从DB返回
        return MyAggregatePO.builder()
                .foo("foo")
                .bar("bar")
                .version(1)
                .build();
    }
    
    public void update(MyAggregatePO root) {
        //TODO do database update
    }
}
